package com.czxy.dao;

import com.czxy.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface UserMapper extends Mapper<User> {



    //登录逻辑 判断用户名和密码
    @Select("select * from user where username={#username} and password=#{password}")
    public  User  login(User user);


    //校验用户名逻辑
    @Select("select * from user  where  username = #{username}")
    public List<User> findUserByUsername(@Param("username") String username);

}


